using System;
using System.IO;
using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;

[TestClass]
public class UnitTest1
{
    private void tester()
    {
        return;
    }

    [TestMethod]
    public void TestOnzin()
    {
        return;
    }

    [TestMethod]
    public void TestStall()
    {
        Stall bogus = new Stall();
        int test = bogus.stall2();
        Assert.AreEqual(6542, test);
    }

    [TestMethod]
    public void TestMyMD5Sum()
    {
        MyByteArray myArray1 = new MyByteArray(new byte[] { 1, 2, 3 });
        MyByteArray myArray2 = new MyByteArray(new byte[] { 4, 2, 3 });
        MyByteArray myArray3 = new MyByteArray(new byte[] { 1, 2, 3 });
        MyMD5Sum myMD5sum1 = myArray1.md5();
        MyMD5Sum myMD5sum2 = myArray2.md5();
        MyMD5Sum myMD5sum3 = myArray3.md5();
        Assert.AreEqual(myMD5sum1.compare(myMD5sum3), true);
        Assert.AreEqual(myMD5sum1.compare(myMD5sum2), false);
    }

    [TestMethod]
    public void TestArchiveFactory()
    {
        Pool myThreadPool = new Pool(5);
        ArchiveFactory factory = new ArchiveFactory(null, myThreadPool);
        List<string> files = new List<string>();
        files.Add("gegevens1.txt");
        factory.createNew("test1.prt", files);
        myThreadPool.quit();
    }
}

